import request from '@/router/axios';
import qs from 'qs';

// 数据列表-领用申请
export const getListOfReceive = (data) => request({
    url: '/receive/v1/pageQuery',
    method: 'post',
    data: qs.stringify(data),
})
// 详情-领用申请
export const getReceive = (data) => request({
    url: '/receive/v1/findById?id='+data,
    method: 'post',
})
// 重写详情-领用申请
export const getReceiveOverride = (data) => request({
    url: '/receive/v1/getByIdOverride?id='+data,
    method: 'post',
})
// 领用出库-领用申请
export const insertOutBoundReceive = (data) => request({
    url: '/receive/v1/insertOutBound',
    method: 'post',
    data: data,
})

// 添加-领用申请
/*export const addReceive = (data) => request({
    url: '/receive/v1/insert'+data.note,
    method: 'post',
    data: data.receiveInfos,
})*/
export const addReceive = (data) => request({
    url: '/receive/v1/insert',
    method: 'post',
    data: data,
})

// 审批-领用申请
export const examineReceive = (data) => request({
    url: '/receive/v1/getReceiveId',
    method: 'post',
    data: qs.stringify(data),
})
// 修改-领用申请
export const updReceive = (data) => request({
    url: '/receive/v1/update',
    method: 'post',
    data: data,
})
// 删除-领用申请
export const delReceive = (data) => request({
    url: '/receive/v1/getById?id='+data,
    method: 'post',
})

//数据类表-领用出库
export const getListOfReceiveOut = (data) => request({
    url: '/receive/v1/pageQueryOutBound',
    method: 'post',
    data: qs.stringify(data),
})
